package com.engine4cloud.tdf.supervision.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.engine4cloud.tdf.common.data.datascope.TdfBaseMapper;
import com.engine4cloud.tdf.supervision.dto.query.JzdxQueryDTO;
import com.engine4cloud.tdf.supervision.dto.query.JzdxSimpleQueryDTO;
import com.engine4cloud.tdf.supervision.dto.result.JzdxResultDTO;
import com.engine4cloud.tdf.supervision.dto.result.JzdxSimpleResultDTO;
import com.engine4cloud.tdf.supervision.entity.JzdxEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface JzdxMapper extends TdfBaseMapper<JzdxEntity> {
    IPage<JzdxResultDTO> pageList(Page<JzdxEntity> page, @Param("dto") JzdxQueryDTO dto, @Param("deptIdList") List<Long> deptIdList);

    String findDeptMaxCode(@Param("prefix") String prefix);

    JzdxResultDTO detail(@Param("id") Long id);

    Integer absence(@Param("code") String code);

    IPage<JzdxSimpleResultDTO> simplePageList(Page<JzdxEntity> page, @Param("dto") JzdxSimpleQueryDTO dto, @Param("deptIdList") List<Long> deptIdList);
}